#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QThread>
#include <QtCore>
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <vector>
#include <settings.h>

using namespace std;


class MyThread : public QThread
{
    Q_OBJECT
public:
    MyThread(QString file, QString dir);
    void run();
    int search(QString filename_string, QString directory_string);
    QString file;
    QString dir;
    QList<QString> resName;
    QList<int> resPerc;

signals:
    void bump(const int &value);
    void change(const QString &name);
    void total(const int &value);
};

char* strToChar(QString str);
void findPairs(CvSeq *objectDescriptors, CvSeq *imageDescriptors, vector<int>& ptpairs);

IplImage* resizeImage(IplImage* image, int resizeto);

extern Settings GlobalSettings;

#endif // MYTHREAD_H
